<% 

'******************************************************************************
'mehrsprachige formulare
'gibt den inhalt in der jeweiligen sprache zurück
'i_language ... 0=keine auswahl 1=german 2=english
'str_k_var_name ... welcher variable ausgelesen wird
'******************************************************************************
Function fc_value_string(i_language, str_k_var_name)

Dim sql_language
Dim rst_language
Dim str_value_language
Dim i_record_status_seek
Dim str_column_name

'i_record_status_seek = 0'der status der abgerufen wird
'1	ready	
'2	in progress	
'3	finished	
'4	checked	

i_record_status_seek = 1'der status der abgerufen wird

if IsNull(i_language) or IsEmpty(i_language) or len(i_language) = 0 or i_language = 0 Then
	i_language = 2 
end if

If Cint(i_language) = 1 Then'german
	'str_column_name = "str_old_german"
	str_column_name = "str_new_german_checked"
end if
If Cint(i_language) = 2 Then'english
	'str_column_name = "str_old_english"
	str_column_name = "str_new_english_checked"'org Feld
end if
	
	sql_language = "SELECT " & str_column_name & " FROM tbl_0953_text_translations " & _
	"Where str_k_var_name = '" & str_k_var_name & "' " & _
	"And i_record_status = '" & i_record_status_seek & "'"

'nur im testbetreib
	sql_language = "SELECT " & str_column_name & " FROM tbl_0953_text_translations " & _
	"Where str_k_var_name = '" & str_k_var_name & "'"

'Response.Write("i_language: " & i_language & "<br>")
'Response.Write(sql_language & "<br>")
'Response.End()
	
	Set rst_language = Server.CreateObject("ADODB.Recordset")
	rst_language.Open sql_language, objConn, adOpenStatic, adLockReadOnly  
	
	If Not rst_language.EOF Then
    	str_value_language = rst_language.Fields(str_column_name)
	end if
			
	rst_language.Close
	set rst_language = Nothing
	
	If len(str_value_language) = 0 Then
		str_value_language = "n/a"
	end if

'2012 03 04 variable die die Function fc_value_string umschaltet (für dyn. Übersetzung)
'1= der Text wird angezeigt
'2= der Variablenname wird angezeigt	
	If Session("ses_i_fc_value_string") = 1 Then'Textausgabe
		fc_value_string = str_value_language
	end if
	If Session("ses_i_fc_value_string") = 2 Then'der Variablenname wird ausgegeben
		fc_value_string = str_k_var_name
	end if
 	
	'Response.End()

End Function
'---------------------------------------------------------------------------------------------------------------------
'---------------------------------------------------------------------------------------------------------------------
'---------------------------------------------------------------------------------------------------------------------
Function fc_value_link(i_language, str_k_var_name)

Dim sql_language
Dim rst_language
Dim str_value_language
Dim i_record_status_seek
Dim str_column_name

i_record_status_seek = 1'der status der abgerufen wird

If i_language = 1 Then'german
	str_column_name = "str_new_german_link"
end if
If i_language = 2 Then'english
	str_column_name = "str_new_english_link"
end if
	
	sql_language = "SELECT " & str_column_name & " FROM tbl_0953_text_translations " & _
	"Where str_k_var_name = '" & str_k_var_name & "' " & _
	"And i_record_status = '" & i_record_status_seek & "'"

'nur im testbetreib
	sql_language = "SELECT " & str_column_name & " FROM tbl_0953_text_translations " & _
	"Where str_k_var_name = '" & str_k_var_name & "'"

	Set rst_language = Server.CreateObject("ADODB.Recordset")
	rst_language.Open sql_language, objConn, adOpenStatic, adLockReadOnly  
	
	If Not rst_language.EOF Then
    	str_value_language = rst_language.Fields(str_column_name)
	end if
			
	rst_language.Close
	set rst_language = Nothing
	
	If len(str_value_language) = 0 Then
		str_value_language = "n/a"
	end if
	
	fc_value_link = str_value_language
 	
	'Response.End()

End Function
'---------------------------------------------------------------------------------------------------------------------
'---------------------------------------------------------------------------------------------------------------------
'---------------------------------------------------------------------------------------------------------------------
'******************************************************************************
'mehrsprachige formulare
'gibt den inhalt in der jeweiligen sprache zurück >>> aber nur für die Hints
'i_language ... 0=keine auswahl 1=german 2=english
'str_k_var_name ... welcher variable ausgelesen wird
'str_k_var_number_titel ... die ID wird ausgelesen
'******************************************************************************
Function fc_value_string_hint_title(i_language, str_k_var_name, str_k_var_number_titel)

Dim sql_language
Dim rst_language
Dim str_value_language
Dim str_k_var_number
Dim i_record_status_seek
Dim str_column_name

'i_record_status_seek = 0'der status der abgerufen wird
'1	ready	
'2	in progress	
'3	finished	
'4	checked	

i_record_status_seek = 1'der status der abgerufen wird

if IsNull(i_language) or IsEmpty(i_language) or len(i_language) = 0 or i_language = 0 Then
	i_language = 2 
end if

If Cint(i_language) = 1 Then'german
	'str_column_name = "str_old_german"
	str_column_name = "str_new_german_checked"
end if
If Cint(i_language) = 2 Then'english
	'str_column_name = "str_old_english"
	str_column_name = "str_new_english_checked"'org Feld
end if
	
'	sql_language = "SELECT " & str_column_name & " FROM tbl_0953_text_translations " & _
'	"Where str_k_var_name = '" & str_k_var_name & "' " & _
'	"And i_record_status = '" & i_record_status_seek & "'"

'#1 zuerst wird die Titelleiste generiert ------------------------------------------------------
'nur im testbetreib
	sql_language = "SELECT " & str_column_name & " FROM tbl_0953_text_translations " & _
	"Where str_k_var_name = '" & str_k_var_name & "'"

'Response.Write("i_language: " & i_language & "<br>")
'Response.Write(sql_language & "<br>")
'Response.End()
	
	Set rst_language = Server.CreateObject("ADODB.Recordset")
	rst_language.Open sql_language, objConn, adOpenStatic, adLockReadOnly  
	
	If Not rst_language.EOF Then
    	str_value_language = rst_language.Fields(str_column_name)
	end if
			
	rst_language.Close
	set rst_language = Nothing
	
	If len(str_value_language) = 0 Then
		str_value_language = "n/a"
	end if
	
'#2 die Nummer für diesen Hint in der Titelleiste ------------------------------------------------
'	sql_language = "SELECT " & str_column_name & " FROM tbl_0953_text_translations " & _
'	"Where str_k_var_name = '" & str_k_var_name & "' " & _
'	"And i_record_status = '" & i_record_status_seek & "'"

'nur im testbetreib
	sql_language = "SELECT str_k_var_number FROM tbl_0953_text_translations " & _
	"Where str_k_var_name = '" & str_k_var_number_titel & "'"

'Response.Write("i_language: " & i_language & "<br>")
'Response.Write(sql_language & "<br>")
'Response.End()
	
	Set rst_language = Server.CreateObject("ADODB.Recordset")
	rst_language.Open sql_language, objConn, adOpenStatic, adLockReadOnly  
	
	If Not rst_language.EOF Then
    	str_k_var_number = rst_language.Fields("str_k_var_number")
	end if
			
	rst_language.Close
	set rst_language = Nothing
	
	If len(str_k_var_number) = 0 Then
		str_k_var_number = "n/a"
	end if


'--------------------------------------------------------------------------------------------------	
	fc_value_string_hint_title = str_value_language & " [" & str_k_var_number & "]"
 	
	'Response.End()

End Function

%>
